Move rewriters to context