Issuing warning when unknown types are referenced.
Improved handling of file positions for messages
Refactoring