Changed inner classes to static nested classes