Small improvements/cleanup/added fixme's for query recursive