still uber messy -- added donfig reader, very basic generation works with arbitrary dir