refactor gist detail view