API extensions

Fixes #3