Added call to cleanup() in freeAll()