refactored gallery to load index files
cleaned up gallery js
updated gallery refactor to include minor changes from review
Merge pull request #300 from seanworkcode/feature/gallery-use-example-index

refactored gallery to load index files