Move test related stuff to test files