Refactored but new logic not complete
Merge pull request #1 from hughryan/newlogic

Newlogic
addition of new logic (working copy)
Merge pull request #1 from McdonaldSeanp/testOutModelFromHugh

Merge of New Logic by Sean