Added domain APIs, fixed a few old APIs.

Also changed variable style to match DO's API docs, for easier comparison.