Improved variable calls and more useful logging.