plugin updates and refactoring

full list of changes made: https://gist.github.com/norcross/e167ce56cfdf63b568de