Leverage jquery dom manipulation#403

I left the commits just to show the things this PR includes. Please don't merge just yet. 
I would need to remove 387a74f (which i included only to test the build)

is that strictly equivalent?

i;e. will it remove the 3 classes whatever is their order for example?