Commit before modularizing DBQueries

Everything should work. Committing to checkpoint before modularizing the
DBQueries class. Also restructured the file structure, so there are a
lot of deleted and new files.