Extra context: API + CLI

Fixes #12
Synthesizes parts of: #75, #100, #116, #161 and #199.
Thanks @fcurella, @aventurella, @emonty, @schacki, @ryanolson!
Could this and the previous change be removed? They aren't a complete fix and they introduce merge conflicts with my PR that does fix this input testing issue...