various fixes

just to make it build... all pointer crap and typos