Implemented the gui system