Refine and cleanup