[WIP] Refactor gallery

Trying to make gallery code better

![cooperativewealthyarrowcrab](https://cloud.githubusercontent.com/assets/1492067/3554940/df9bcf96-0911-11e4-8cda-17a05d930b01.gif)