Implemented BFS. Changed some move mechanics.