Fixed memory leaks, futzing with build process