Implemented cleanup