Made some changes, fixes and notes to utils.js