update PR: better clear(), delegate purge(), formatting