Refactoring to add frameworkhelper.js