Redo storing of types and type declarations