plugin handler completed. Needs testing and bug squashing