Remove deprecated MySQL functions and include MySQLi classes