Refactors to include logging database interaction.
Word model, with to_s.