Moved specialized functions to tests file