route tests and re-factoring DetailController.