adds documentation and removes example errors