refactor parse_log.py--lots of cleaning & commenting