This change has been mangled as my code evolved, I should look at reverting some of this change.