Extensions

Essentially the same as
https://gist.github.com/R2D221/f0363e0ee7123c4d7693, but implemented
directly in the class.