Reviewing code for consistency. Adding error logging for signing.