[Gallery] Improve gallery module