Improve docs, whitespace/imports fixes, some stylistic changes to API.