Added test suite, changed mazeSolver to throw errors consistently