Revert "DAR-1727, remove old unused code"

This reverts commit 9eaceb29df62eb3b5c40afb2d5497879491096b7.