Made progress with Rails 4 upgrade

- Updated Rails version to 4.0.0 final
- Corrected several deprecation warnings