Removed unused parameters; a couple of other tweaks.