fix moduleclass for MySQLdb + style fixes