Update to rails 4

This pull request upgrades the application to Rails 4 and makes some improvements on code readability, specs and updates the Readme.