GKF Working

Switched up while loop ordering and made minor changes in order to get
the converter working correctly.