Clean up ns declarations with slamhound.
Improve coverage and remove unused utility functions.
Fix some reflection warnings with type hints.