Fixes #2. Also added licence.