add license and cleanup