AMD-ify our JS