Enhancments to units parsing

So i added a test for larger values in the router metrics which indeed crashed the service then changed the units parser to use trim.

Interested to hear what you think.