check that handler exists before invoking on it
support for exchange and prefix configuration, some cleanup