Minor fixes to style functions and toggleVisibility.