Moved API code to controllers with Gape generated documentation.