Add a sender key so clients can read messages they have sent. Clean up db access