Rails 4

Removes features implemented by rails
Updates query api for rails 4