Make libraries more modular