Updated classes in example to use contexts