Updated to w2d3 version

Misc bugs fixes
Now supports castling