Added a way to add or remove multiple contexts at once, refactored, and added a test.