Add comments and improve readability of test code
Fix #105 division by zero error if elapsed time is zero