Reorganized TypeRepository to Types and inner types.