Major refactoring

 - Moved all the logic out of the rest facade and extracted it into
   seperate files.
 - Added a repository.js to deal with the data persistance.
 - Added a streamController to monitor the streaming processes.
 - Added a streamProcess to deal with the actual streaming.  These will
   now be run in their own process.