Yaocho APIs

This adds a few APIs that were useful for Yaocho. These need to get to prod before I can put Yaocho in the marketplace.

r?
indentation here is messed up. 2 spaces instead of 4?