skeleton for mysql middle layer
move mysql specific helper functions to separate file

for use in both the middle and output layer
use mysql middle layer when mysql output layer is used
slowly adding flesh to the mysql middle layer
more work towards a working mysql middle layer, but still not there yet ...