refactor dsl structure