Refactor

app structure and dependencies