Major refactoring in Chess.Base library.