Extend and extensions support, fixes #10