migrated object and views model in JS code for ease of maintenance and compilation;