Add license, fix comments