another major refactor centered around config.js