Basic refactor (second draft).

@quigproquo
Hey guys, 
  I refactored a lot in some controllers, added helper methods, and cleaned up the JS. I also may have fixed     the bug in the queue but not sure.
end