small refactoring

extract Exdefinition module
update test