add requestAnimationFrame, optimized events

added body resize event detection, optimized and throttled events