Implemented a lot of methods from the homework section.