Added docs and removed lambdas