PRODSUPP-1228 Refactor code