added UnitLibrary, UnitManager classes