Refactored most of the libs to external official npm modules