A bit of code compaction and variable renaming
Allow current_signal to go down as well as up.