Merging Grid Puzzle

The grid puzzle methods and A* framework.

The majority of this still needs documenting and testing!