improved gallery editing