Improve the vanilla effect performance by relying on a bool to tell if the vanilla class is applied or not instead of getting the current state from the DOM

Signed-off-by: Henrique Vicente <henriquevicente@gmail.com>