Moved const.js to core directory and associated refactoring