Basic handling of types with/out IDs, ready for refactoring.