Remove unused, sample parameters, add explicit scope brackets