More locking down, using logging instead of print in API-like things

Etc