Remove the last SQL statements from the tests; Also, fix a bug with
loading categories
Refactor model classes into ActiveRecord models.
Refactor editing purchases into a method