licence and cleanup