add license and remove cruft