window animation + cleanup