first attempt
Made class definitions more standardised