Some reactoring of workflow and runtime apps