Fix warnings and non-pch build