Revert "Revert "src/library.js""

This reverts commit a1f794b37fc1688c7705a7fc6b134a474dcb725e.