Tidied up the class defns