Separate event listener from Window class and create maze class