clean up the module interfaces and event queue

Signed-off-by: Jan Dvořák <mordae@anilinux.org>