Clean up and fixes.

Using `docker ps -a` instead of `docker ps` to take into account stopped containers, and doing various bits of code clean up before going back to getting additional tests done.