Implemented a lot of the extra credit