Add signature test, add encode/decode checking