Fixed performance bug in 8puzzle
Final refinement in 8puzzle.