restructuralization of main and app, added event aggregator