Added a licence file and a working version of the contract.