added cleanup command
tweaked cleanup order