Code cleanups and licenses