Main app method