Fix line-by-line output from parsing. Use MongoClient.  Fix various pep8.