Cleaning up some puts statements and making global random object