Fix formatting of API stubs

- Remove trailing whitespace
- Translated tabs to spaces
- Added newline at EOF