Better setup logic