Vanilla js improvements