Rewrote jquery calls into vanilla js