Added internal switch case to handle GUI options.