Changed some foreach-loops to use stream().
Removed redundant type parameters from where the diamond operator could be used instead.
Updated the merged files to call the updated methods.