Overhaul of previous naive hackery with the DB, bringing in the new knowledge I am getting to design a more efficient and organized DB