Write to cache now handled by atexit, fixed style, add util.py