:refactor, improve base.ts management, use properties.

and a UT.