Refactor: Added lambda expressions clean the code.