Changes required for Rails 4 support
Fix some tests and deprecation warnings
Remove useless require