Misc. cleanup and documentation updates. Plus, replaced some function objects with Lambdas