Adding tests and renaming some API calls to feel consistent with docs.