finish refactor and add test for script dsl format