Revised inner classes. v1