Added a cleanup mode