Revised #1124 (Visibility fixes)

This is a slightly revised version of @simplysoft's work that primarily neatens up the Ruby in the view.