Cleaned up plugin.py