Clean up units namespace, change behavior of read-unit

read-unit has been changed to only work with strings.
Fix indentation