Make browser API match server side API

This makes the browser version have an API that matches the server side version.