More cleanup and pump optimizations.