Fixed memory leaks, fixed eval