starting middleware
meh moving to root
added Router test
adding tests and refactoring