added MainComponent.js - implement application lifecycle here