Modified database class with PDO connection, corrected functions, Check TODO