separate config from js logic and rakefile fix