Add ping calculation, update night mode