Changed library submit testing out of main testing code.