started writing unit tests for DocParsers and adding error checking to comply with spec