various code optimizations (functor, const variables, ...)