Code cleanup as per Bruce M's helpful suggestions.