DSL improvements, event handler bug fixes