Move most of the helpers from plugin.py to a separate module
Remove obsolete helper method