Moved some window logic to Raindance