Adding some convenience functions to Span and Endpoint classes.