Refactor notification type into using a class for definitions instead of a dsl.