Cleaned up the controller and routes a little. Moved format to a get query string instead of passing it as a parameter