Cleanup of the sql mixin