added callback interface to modules, reworked module interface