added dayView functionality, minor cleanup, and moved where the window is created to something dependent on operating system.