Extension methods that I've used over the years.