Refactored line retrieval and some other stuff. Added entry and exit point to maze.