fixing data gathering bugs, and adding some analysis options