XD-561 Parse now verifies that all modules are valid.

XD-561 Tests now support enhanced parser

Merged code after rebase.

Added changes requested from code review.

EnhancedParser now checks for nulls in its constructors.