clean up unused variable warnings, code quality