New feature: Gallery

* Added a very simple gallery feature (no tests yet)
* Fixed a possible endless loop in the randomize array function (JavaScript)