Move a bunch of MySQL related logic to separate module.
Merge pull request #10 from wvanbergen/implementation_cleanup

Move a bunch of MySQL related logic to separate module.