Renamed the internal types, and upgraded tests.
Added licences, copyright notices and readme.