Refactoring, remove type map