Add license, fix $MAX