added Application launching
much code cleanup