Cut off new mysql class from main files.

Also did some small formatting fixes