reviving this. did a little cleanup