Refactor of KStandard lib
Fix bug on specific math lib and exceptions added