Rails 4 compatibility and clean
Merge pull request #4 from matjack1/master

Rails 4 compatibility and clean