remove Python-2-isms from DirectGui and FSM to make them work with Python 3
Reset the state and transform before the end_frame callback (needed for Blender integration)