Ip policies submod

Refactors plugin.py, moving IP policies and associated tests into their own modules for enchanced plugin.py readability.