added amd wrapper and removed onLoad initialization