Simplify parsing of units