Compated var declaration and initialization

No need to have two lines. The type is even explicit when we are type
casting on `float64(size)`
Refactor regexp.Compile to init

It would be better to not recompile a static regular expression each
time the function executes. Abstracting it to the `init()` method.

TODO: Check if `panic()` is the right thing to do on `init()`
Moved 'units' catalog out of function

No need to initialize every time the function executes
Remove named returns since not used in func body

Might prevent potential subtle bugs
Better not use `error` as var name

Better not to use `error` as var name since it might eclipse the error
type and cause subtle bugs