Replaced lost code, refactored the window animations