Fix tests and change license