Improve and add documentation.