Refactored config file to javascript