Sub-all functionality in function, and use it in CRABSubmitter.