introduced primitive-math as dependency; use primitive-math/not== instead of not= to avoid boxing; updated pan to use caching for more efficient processing; other optimizations