Using an inner class for improved scope.