Used vec.data() instead of &vec[0] whenever possible.

C++11 introduced the guarantee that the data std::vector and std::string are stored contiguously in the memory and therefore introduced the method data() to access the underlying array, which us now prefered to the old &vec[0].