Edit documentation and fix scanner function