minor refactor of doLayout() function. moves the appending of list fragment to when's done handler.