What was the purpose of the Pendleton Act?

A. to end presidential assassinations

B. to end spoils system of hiring

C. to give the president more power to hire those he wanted to hire

D. to give Congress the power to approve all executive branch employees