State fully commented and some optimizations added and bugs corrected (e.g. the constructor was assigning the hash key BEFORE the move to the new board was made).