Re-arranged the class to create a class to inherit from