Fix memory leaks, assignment operator