added endpoint selection and get_snapshot method instead of snapshot object.
cleanup