Changed to use inheritance

Could look to change this to use composition in the future.