Component / Entity model implementation for JavaScript