update config file & refactor controller source