More efficient cleanup method