refactor snapshot details code a bit