Added signal to the util package and refactored signal