In progress: fixing up type checking, and adding "done" action