Follow rails conventions

I'll comment line by line on Github to explain.
Merge pull request #1 from shanemcd/master

Fix things