Changed to using display rather than visibility