made c++98 compliant

took out auto ranging for loops because my laptop doesn't
build against the newest library for c++11
Function sigs for mod1
scan_rev implemented two ways
fixed syntax error in alternate implementation