Fixing issue #7

See #7 for full detail.

I also added a Licence file.