refactored a lot into the SQLCommands class and I think I have fixed the performance issues in all but the mass upload section