Merge MySQL code into Database class