Changed usage, added cleanup flag, added logic