made gallery sorta work with sequential folder

and alot of other junk