Simplify and add documentation.