New API

This is now being used by learnyounode@1 (alpha currently)