[fix] rewrote the routes to be more flexible
[test] Fixed broken test suite