Clean up the signd function.