Refactor demo app
Refactor core