Add print function compatibility
Fix idioms