fix(structure): refactored engine code

 * files are modules instead of functions
added createjs cnd import to index.html