Minimax move generator (sloow). Some minor improvements