Simplifying Javascript prototypal inheritance with extend