Implement enums and classes for JavaScript