Major tweak

Previous update broke the entire database update system, had to rework it back while still keeping things tidy.