Refactor context.xml.