REFACTOR: Rearchitected application.

Behavior is same as before.