Improve horrible code by refactoring into lambdas.
Merge branch 'master' of github.com:mythagel/cxxcam