Added Context class and unit tests for it

Changed Queue class