Implemented proper cleanup from previous setup