Refactor library modules
Commit missing files