Rework in progress

I want to facepalm over and over again until i can remember why i coded
some of this the way i did. Mostly i'm deleting everything and starting
over