Code at the end of the 21 July hackday. Fixed bug in how narrative was calculated