Refactored interface
Refactored unitregistry
added comments