Message write to db. Read by user. Refactor db interactions to data.