EXTSCRIPT-154: Code Rewrite/Refactoring,fixing a new issue in the codebase which prevented code to be loaded