Added logic to start and stop processes.