use one global struct instead of many vars for selection. Cleanup.