Hello, this PR changes replace inner class with lambada to make the code more concise.

Comment From: sbrannen

This has been merged into master.

Thanks