Rename some types, add more documentation.