Simplified _to_string, implemented build_dag and fixed srand()
Install headers "in the right way"