Add support for fetching older and newer messages. Add tests