add scripts, refactor to fix #2 . still some work to be done in the generator module