performance improvement (no foreach callback)
performance improvements. Still not as smooth as I'd like