Renamed plugin.py -> base.py; improvements to core plugin