Bootstrap script cleanup and idempotency