Fix window expanding and improve animations