First cut at context.io and soe refactoring