Refactor code on product model