Minor refactoring.
More test.
Refactoring and fixed a bug in createPuzzle to avoid ambiguous boundary features.