tidy up

clean ups to API