Updated JC-1339:
-refactor code according to recommendation