added a gallery file, changed most of the stuff especially in gallery, to make it simple