Small refactor to make more sense.
More refactoring. Just need to write the DB set/get functions now.