Relocate context building outside of source page