Issue #152: ported the fix proposed by Matt.
Ported the fix for spacing the value and unit as done for issue #152.
Removed some obsolete code.