Add dashboard to app, some refactoring