Improved usage of lambdas, method references and generics