going to start working on the gallery function

- the function's confusing, and has a lot of variables that aren't
being used in it