Cleanup with some close logic