minor renames and comments
clean up and change matching to indexOf()
more refactor ... standardize on record format for storage, etc..