Various fixes to get stuff to build