docspt cleanup code