Add license & misc fixes