more improvements to performance plus bug fixes.