optimization cleanup