Added complete windowing functionality