handle errors in the bookmarklets better
final tidying up and commenting
typo
not needed now