added test, removed cleanup and put the deleteOld() calls directly into CLI
removed debug stuff