Move paintProps collection into recursive function