some bugfixing, maze program works as far as i can tell