shell: fix a write after delete
shell: Move the Signal's functor classes inside it