Added functions to gui buttons.