Refactor to split DSL from internal logic
Add LICENSE file