refactor context service, use context validator
Merge branch 'refactor_context_validation'