Improve SCRATCH API.

- Remove flush_left (made static).
- Add full and clear.
Fix whitespace.
Update to new scratch API, fix error state logic.