reorganize responsibilities between ContextManager and controller