Reverted directory parsing back to original