Force signature_expiration to an integer, add tests