Converted to PDO format

Changed from mysql_* to PDO and also removed auto generating files