Split routers code (base/subclasses), improve tests