+1 on the idea of moving this functionality to a baseclass. Just not in this PR though :)