Added application launching
Much code cleanup