Simplify query and update functions, lean into the monad