Refactor things

I have a better idea what I'm doing now.  Slightly