Code tidy and license updates