code reorganization and new modules to multiple files
defined interface for defuse querying