Improve code readability in speed monitor