Refactored Occurrence#finalize out to several finalize methods, which
are called depending on the type of the occurrence