Add logging.  Use constants instead of variables.