reworked the comments to explain the content of the method according the design by contract priciple
added comments to factory and added type to the implementations of length units