Refactoring.

* Move UI logic out of data entity.
* Use setPipeConfig instead of setNumPipes.