Refactored the GUI registration