Finish documenting scanner.js