Fixed gcc's warning and began valgrinding