github/codereview: Refactoring
github/codereview: Refactoring

Refactor the given module heavily to address review issues. Since the
original code was pretty shaghettish, the refactoring was quite heavy in
the end. The module should be much more understandable now.

Change-Id: 89035c0b80
Story-Id: SF-147

salsaflow/salsaflow,salsaflow/salsaflow