Added license & todo, and a couple of fixes