A bunch of changes, including the SOP case study and some bug fixes