Clean up sequence testing code a bit