refactor video and gallery