Output more diagnostics
Fixed a few parsing errors
Added discontiguous context.