refactor ~ config & router