Add a license header and remove unused var