added types for s_group.
prefixed unused variables with underscore.