Refactored class.
Changed to use new TypesUtil interface.
refactored tests to acommodate new TypesUtil interface.
new tests added.