performance tweaks, minor enhancements