Moved DOM normalization back

By using the normalizeDocument instead of normalize we can now call the
normalization after the final node manipulations