License and copyright

This fixes #23 by adding a license and proper headers.