Added wrapper functions to separate GUI from functionality