Added post-loop call to analysis functions. Next: make sure to fill structs with correct info