Types. Fixes #1.
Version.
Better types, auto derived type class and some tests.