refactor into different files, and make conf file prettier