Added .gitignore
Added licence and readme.
JS fixes