DOM cleaning & jquery optimizations