eliminate pedantic g++ warnings, clean declarations

make local functions static
correct class member initialization order warnings
correct integer signed/unsigned comparison
removed unused functions left over from old code
mask warning about assignment in comparison