Dominic: simplify lens code, add state monad behaviour