general refactoring
added mechanism to return warnings for issues found during parsing
updated examples to display the warnings