just some minor changes, actually freeing the memory in the vector arrays I have