Added minimizing/maximizing to windows and other small changes