migrates universal functions into libraries.js