Tested and fixed a lot of SQL and database stuff All functions working as intended
Merged Conflicts