api.rb optimized, front and backend resourced divided into seperate modules