Utilities cleanup

Cleaning up code in utilities JS before I write tests for it before I eliminate calls to ilios.lang from it.