Refactor Signal to work on raf and drop jQuery dependency