Added MysqlStatementFactory and bug fixes.