Switch to proper js inheritence: Constructor.call(this, ...) + merging prototypes

as per http://stackoverflow.com/questions/4152931/javascript-inheritance-call-super-constructor-or-use-prototype-chain