Massive refactor. Going to have a db backend now.