Made a few fixes, including removing the 500 extra lines I put into pd_rand.