Some reworking to use properties instead of constructor arguments, and to use composition instead of inheritance