Implement a context stack for issue #1, additional testing on this