More build fixes & improvements