Overhauled result processing to support directories