Fixed typos and added some functions