scanhash: Document scanhash related methods with comments

Minor nit: last line here doesn't align. Should be tab+4 spaces, rather than 2 tabs.