Refactor cpu collector