knockout app refactor