Adding in testing script. Detecting rank-1 pdfs and treating things are independent.