rearrange and add documentation to purger