Added manual run type and partly implemented flashing