Add more docs and review scan logic