Neater code and typos