Experimenting with advantage die from D&D 5th Ed. Need help with probabilities with anydice

How would you compute :

Roll Xd20 take highest. Add modifier.

When scoring a critical sum up 1 extra dice.

When scoring multiple criticals sum up as much extra dice.

Thank you very much for your answers.