turned some of the small classes into inner classes