refactored controller and helper logic to models
Merge pull request #1 from nemrow/major_models_refactor

refactored controller and helper logic to models