Also updated debugging info to give more flexibility as to the level of info logged and remove some unnecessary logging.