Initial work on basic API.