Migrates to Rails 4 with associated initial code changes. Updates other errors found during manual testing.