Tweak of move generation algorithm. Working properly, but could use a cleanup.