Added tests and modified routes a bit.