Moved most functions to MYSQLMONITOR CLASS