Add license, and other fixes