Change to use inheritance instead of previous silly arrangement