Lambdas added, now somewhat functional