1) Refactoring of updateParameters() in context processor
2) code cleanup
3) tests