Added libraries
Refactored modules for coherency