Fixes for the module
Refactor
Fix library