Updated code, documentation and added README+license info (@Issue 1)