Organize start and stop script in a better way