Even more improvements to unit handling.