Minor tweaks, better error handling, documented API changes.