Fine tune performance. Squished some memory leaks.