Adapted to changes in GDJS ( Switched to prototypal inheritance )