Tidy empty attributes

Wee tidy up.  Some attributes seemed to be coming in as empty and so the join(' ') was adding an extra space.