Fix unused parameter/variable warnings

And remove stray semicolons. Addresses #1777.