Turn off logging + minor code improvements

Turn off logging + minor code improvements