Remember workbench state

In the interest of getting this in, I rewrote the two functions as per @dchambers comments. It's all the same stuff, with a new commit added (I wanted to re-open the original one, but it seems I can't).

<!---
@huboard:{"order":374.46875,"milestone_order":1062,"custom_state":""}
-->