Fix bug where params weren't showing in log.  Also memoize
Use params for sets for performance and also to prevent injection