Migrated library to AMD loading