Let the serialiser dynamically load the entry point document.
Moved the resolving stuff in to the parser.