Preparing to include stats into webui, debug so far.