Simply extend classes in JavaScript