! Router code cleaning and refactoring