Minor JS improvements

Fixed 'utils' is undefined bug