Improved gallery monklet code.