created gutils.py and cleaned up gmath.py