Adding conditional GUI code.