Fix to allow animation to resume when user selects a new rule (and the animation of the previous rule had already ended). Also minor adjustments to calcs involving placement of grid and number of rows.