Overhauled db to make it simpler and more intuitive.