Implemented lambda expressions where applicable.