restore
Revert "Revert "cleanup and router""

This reverts commit 04c407baafeb3a697ebd7d278bdc7b78ae1559f2.