updated prepublish to use common.npm

what was wrong with the old cleanup function?