Set LFN base according to input dataset; also tidying up