Began maze code