Adding logic for isolated and active neurons