Fix input signing bug, change parameterization and update tests.