performance tweaks, fixes, discoveries