refactored code, eliminating config.js

code was put into initialize() in main.js to ensure it is run in order