Abstract realm functionality to an external class