Add config file and move constants from functions