Refactor Controller to remove duplicate code
Merge pull request #2 from albertsaave/master

Refactor Controller to remove duplicate code