Key table stored in storage is now signed. Added a few error logs plus
general code cleanup.