handles single refer and removes :require if empty