Optimised modal gallery code and new exercises.