A few bug fixes; also moved the getMySQLConnection to public