LPS-46275 

Hey Brian,

You have asked @LeventeHudak to do some refactoring - extracting the similar code, he has finished it. I've reviewed it and did some changes as well.

Thanks,

Máté