Added Window class for 'cleaner' code