minor changes to make the gui more efficient.