Created an application interface to be called by main to start applications. Updated server and main to use this new model.