Mime errors sl4715

The objective of this pull request  is remove old c code, and replace by external libraries.
I didn't find replacement for one method, and was implemented using python.