Removed logic from controller and placed into factory
Merge pull request #83 from Yahkob/feature

Removed logic from controller and placed into factory