got rid of signed/unsigned comparison warnings and init reorder warnings.