Added some documentation and tidied up some routes.