Add license
Made sure variables are local, hopefully i didnt accidentally overdo it.
Some more making variables local, fixed a issue in contract.js(why was the name `addr`?)
and turned `<textarea` into `<input..>`