fix a number of unused argument warnings
fix a number of shadow warnings