build fixes and docs