Added more testing code for gallery app