#JC-1647 Added comments and unit tests