WIP on tests. Run 1st test case and pass it for expand, compact and flatten. Pull in contents of context when it's part of the test.