modernize js util and removed jquery dependency