Implemented parsing of type declarations
merged