refactor date, load average and battery scripts