update base, cleanup toggle code