Valgrind says zero bytes leaked. Some changes ~