Fix build; misc changes