refactor main ctrl functionality into factories and control with promises
Merge pull request #10 from slrubinstein/refactor-main

refactor main ctrl functionality into factories and control with promise...