context references. Closes #328