Use the new animation feature

Also start simplifying the window code