Created application context and implemented startup logic