Added basic cleanup functionality