lots of updates and fixes to code, fixes to checking of chess rules, implementation of tree and fixes to linked list