Rewrote large parts of 8gallery