Minor cleanup work
Intermediate, memory-leaking commit