Refactor the cpu load script and add comments