Refactor dsl