Added lambda calculation and removes some unneccesary things that are now all part of the lambda calculation