add arg to just gen files, refactor, cleanup