API linting/hinting

- Refactor for shorter variable names.
- Fix obvious mistakes.