LPS-32500 Encapsulate logic to avoid code duplication
LPS-32500 Make helper methods private
LPS-32500 Helper methods can be protected

This reverts commit d1ad07b2b88484d4284ed2b4e137e19da915fc83.