Improve docs, remove unused declarations.