initial refactoring of signals module