Various extension methods.