Realex integration fixes

Changes from code review as requested @j-mutter @andrewpaliga