Added DB connection pooling, massive refactoring to support user-specific info and new DB layouts

Note: some Routine functionality is commented out/not working