Minor fixes to api and typos