Remove redundant lambda functions