rails 4 ready
Fix warnings and deprecations