Code cleanup
Move plugin code out of __init__.py