Replaced some inner classes with lambada expressions