Refinancing a 30 year Mortgage after 15 years

I’m mostly interested in people who owned their homes for 10-20 years, before refinancing in the last couple of years.

When you refinanced, did you obtain a new mortgage for 30 years?
Did you refinance for a shorter period of time?
Did you take some of the equity out so you could spend it on something else?
Was the length of time you expect to spend in the house, or the length of time before you anticipate retiring, a factor in your decisions?
Any other issues that complicate your financial planning?

Basically, I’m curious as to what kind of mortgages people in this situation tend to get and what motivates that choice.
(And just so you know, I’m not a homeowner, nor do I know anyone likely to make decisions based on the outcome of this thread).