A rewrite of the signature code in java to be toolkit independent