update documentation, and remove unused code