Updating unit tests, models and schema

Going through and fixing some of the unit tests that were written for this branch.

Edit: All unit tests passing :)

Edit 2: Most functional tests are passing now too. The remaining failures are in `test/functional/api/test_results_controller_test.rb` because `api/test_results_controller.rb` will eventually need to be updated to accommodate the new test framework.