First stab at modularizing the DSL implementation