some code cleanup in gmix em