Some code cleanup.
Some work on completed calls