Use a proper animation library and clean up a bit.