Minor tidy-ups in codebase.

- Removed preference's blocking on main thread with apply().
- Unused imports.