getting it buildable and a few fixes