Refactor code with Scott's feedback
Refactor code with Scott's feedback

- Refactor the controller code with Scott's
  feedback on github.

concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse