Fix bug relating to elephant moves
Fix several off-the-board bugs