Partial commit 5 for the Rails 4 migration. Fixing a few tests on layers activities #740
Partial commit 6 for the Rails 4 migration. All tests working! #740