Major cleanup of features_GUI code. It is now more readable and works better.