Move code into types module and provide __version__ attribute.