FIX Small corrections

* Remove unused code
* Redefinition of stdout fixed
Remove more unused code
FIX deprecated doc