Migrate K Library to Require.js