Refactor app, toolbar, debugging and running