router: remove application specific code

This should be removed from here, as it is application-level code.