Fixing memory problems I created. Maybe fixed? Running Valgrind now.