Test the modal and add revoke functionality in a test-first way

Fixes #207 #209