cleanup and refine deploy task