Migrated from webplatform.js to wp-2.js