Add Galleries resource (way too much stuff for one commit).