Added contexts.h documentation
Unit tests for contexts.h