LUN-783 : Refactor code