Attempt to use inheritance in JS

It hasn't gone well so far...