Code tidy up

Removes some cruft and improves readability. @incuna/js please.
`* Remove cruft, increase readibility`

:trollface: