fixed more broken stuff. Still doesn't compile, but getting close!