(feat) Implemented Router middleware

This should be above line 12.