The show / hide UI function has been optimized + minor tweaks.