JavaScript helper to work with more-less classical class and inheritance structure.