JC-1428 Initial version after refactoring, unit tests commented