In Disraeli's first short period as prime minister, his government passed legislation which had wide support. It ended public executions, and the Corrupt Practices Act did much to end electoral bribery. The government used an early version of nationalisation: the Post Office bought up the telegraph companies. There were changes to the school law, the Scottish legal system, and the railway laws were passed.