changed some things around
It... Compiles!
Database functionality
Database functionality - fixed bugs
Fix code indentation
A quick round of cleanups