Build and header fixes