js tidy up and removal of un-needed spacer