A bit of cleanup for the analytics code