Fix remaining small memory leaks - fixes #76.