Added SQL Injection prevention to Database class

I've rewrote and added 2 methods to the class to enable SQL Injection prevention and to help with Unit Testing the Database class