clean up SQLGenerator
simplifed SQLGenerator further