Getter and setter functions needed by the gui.