Minor memory usage improvements.