Minor performance improvements (simplification) were done.