Turn these lambdas into functions; allows them to be pickled.
Merge pull request #42 from dnouri/no-lambdas

Turn these lambdas into functions; allows them to be pickled.