Fixed most tests, more Rails 4 config, got rid of many deprecations