Added license and comments, updated readme
added comments.