Cleaned up all the helper and drawing function areas in NEDsim.