Fix warnings and minimize includes.