refactor route config files and router class.