refactor plist.py