refactor app, setup