Fix linter failures.
Rename api_instance -> apiinstance
Clean up remaining linter failures.