Add license terms and fix dependencies.