extract Definition superclass
coding style: reformat single-line thrown exceptions to use braces
add Definition superclass
rework primitive types as enums and not instances of classes