Some updated analysis munging code