pretty much got this stuff working, probably some cleanup to come and testing against the big run of future stuff.