Add license and fix main entry