increasing performance, reducing verbosity, and fixing a memory leak