Restructered the signatures and finish implementation for signing packets.