Refactor bindings to have consistent API

R=arv
BUG=

Review URL: https://codereview.appspot.com/10890044