Where possible converted fields to local variables, fixed some IntelliJ hints / warnings and changed lambdas to method references