Check in of some changes: don't think I'll be fiddling with this more :(