Move tests to separate functions
Use vector.data() instead of &*vector.begin()