Big update to generic library.

Also fixes to checkers lib.