Added more functions that were written directly in the class
Tidied the code a little and checked some things