Post-rebase changes

- lib modules moved to app/lib
- align branch code with upstream refactorings