Refactor statsbar to allow updating stats

Change-Id: I3958d5216b2e39c6e4873dcb117f95217e5d1788