Types code cleanup2