I just took a look at the GuiClass definition...at minimum it should be refactored to have a setLocation function that accepts a Points value and updates the location at the same time.
i.e. the above two lines should just be `obj.setLocation(Points.Center)`