Rework signals, add lots of tests