Made sure that a targeted element is visible.
Code reorganisation.
Pulled up classes which should be collapsible.
gjslint fixes.