Integrates database schema changes, should fix everything current implemented

This commit attempts to make only minimal changes in order to make the current code base work with the database changes. Only very minimal changes were needed in order to get the staff home page to work the same way with the new schema. There was lots of other refactoring that could be done, but the purpose of this pull request is only to get what we already have working and *not* to try to improve things at same time. Now that it is working, we can go back and do any refactoring if needed.