Fix a copule of issues to compile
Review undoCore code

Rearrange to make it flow similar to makeCore.
Add pawn promotion handling.