Pattern refactoring branch

This refactors into a deployment/pattern approach