refactor the API for
Merge pull request #33 from google/devoncarew_refactor_api

refactor the API for