have Cost treat empty string as zero; slight enhancements to unit tests