Added two passes, for clearing comments and for collecting type defs per type. Fixed a possible crash with the multiple inheritance.