[refactoring] unify and remove duplication from store/doc update functions
[refactoring] unify and remove duplication from store/doc update functions

jigargosar/elm-simple-gtd,jigargosar/elm-simple-gtd,jigargosar/elm-simple-gtd,jigargosar/elm-simple-gtd