code cleanup, license