Fixed minor bugs. Reworked getAllValidMoves return value