Making GUI functional