Fix a bug in which normalization failed to update a component's quality parameter
Add an ErrorManager class that manages the layer errors for a document, writing them to disk as appropriate.