cleaned up code in visual parse