Refactor get_context so that set works
Add more tests for set