Fix mi_attempts.
Remove comments.
Add ping & test routines.
Convert to classes to be called from test rake task.