fleshing out the API, tidying up more